{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "from sklearn import datasets, linear_model\n",
    "from sklearn.metrics import mean_squared_error, r2_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "# 读取数据\n",
    "diabetes_x,diabetes_y = datasets.load_diabetes(return_X_y=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(442, 10)\n",
      "(442, 1)\n"
     ]
    }
   ],
   "source": [
    "# 为了便于画图，只使用一个特征\n",
    "print(diabetes_x.shape)\n",
    "print(diabetes_x[:,np.newaxis,2].shape)\n",
    "diabetes_x = diabetes_x[:,np.newaxis,2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "# 拆分为训练集和验证集\n",
    "\n",
    "diabetes_x_train = diabetes_x[:-20]\n",
    "diabetes_x_test = diabetes_x[-20:]\n",
    "\n",
    "\n",
    "diabetes_y_train = diabetes_y[:-20]\n",
    "diabetes_y_test = diabetes_y[-20:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "# 实例化分类器\n",
    "rg = linear_model.LinearRegression()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LinearRegression()"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# fit\n",
    "rg.fit(diabetes_x_train,diabetes_y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[938.23786125]\n",
      "152.91886182616167\n",
      "Mean Squared Error 2548.0723987259694\n",
      "R^2 0.47257544798227147\n"
     ]
    }
   ],
   "source": [
    "#  查看截距和斜率\n",
    "y_pre = rg.predict(diabetes_x_test)\n",
    "print(rg.coef_)\n",
    "print(rg.intercept_)\n",
    "print(\"Mean Squared Error\",mean_squared_error(y_true=diabetes_y_test,y_pred=y_pre))\n",
    "print(\"R^2\",r2_score(y_true=diabetes_y_test,y_pred=y_pre))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "import seaborn as sns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAwO0lEQVR4nO3deXCc933f8fd3L+ziIgASILAkKAoSKYoUCdiGGMeyaVqybB0U4M40HnbaxGncimndRGnTqeVkqqTqeOomqRO16UG1SSM3B60kbglKlmRdNK1YEg8ZIAmSEimIEsAFCJAEiGPv3V//2AMLCiAW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",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.regplot(x=diabetes_x_test,y=diabetes_y_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": false
   },
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x1f8b09159a0>]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAcyElEQVR4nO3df3TcdZ3v8ec7BVqzFkshhZY2mYKVI91dCw3Fi3gPu7iKgFt0YU/dwCnKbtDDKuV611uM7qK7OaLuiqxHgQho145wq2WvtXAvIodF4fDDFAq2FGjZJmmgtmUrUokU2rzvH9/vdKbtZOY7v7/zndfjnJxMvvOZyTuT5JVPPp/P9/M1d0dERJKlrdEFiIhI9SncRUQSSOEuIpJACncRkQRSuIuIJNARjS4A4LjjjvNUKtXoMkREmsq6detedveOfPfFItxTqRSDg4ONLkNEpKmY2fBE92lYRkQkgRTuIiIJpHAXEUkghbuISAIp3EVEEkjhLiLSAOl0mlQqRVtbG6lUinQ6XdXnj8VSSBGRVpJOp+nt7WVsbAyA4eFhent7Aejp6anK51DPXUSkzvr6+g4Ee8bY2Bh9fX1V+xwKdxGROhsZGSnpeDkU7iIiddbZ2VnS8XIo3EVE6qy/v5/29vaDjrW3t9Pf31+1z6FwFxGps56eHgYGBujq6sLM6OrqYmBgoGqTqQAWh2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GCUYK86YTfbfm6VAZqLph5Twr2KN6xoF7grD/HEzGyfYWGhXg2o6meCH7Ckzyxx/wswWufuvG1RT5jmWAhcC5xb741dEwc9TpM1RER5b75owsyMJgj3t7ndVoZ5Ka7oY+HMzOx+YAhxtZivd/dIG1+XAqLtn/rP5EUG4N7Km9wFb3X0XgJndBZwF1DXc6zrAn/sGfI2DJ+S+mqfNEcB/EoRTZlJjfnjfJuCc8Pa5wLqY1PUJ4Evh7XcQ/NtmjazpkHZDVGdCtdLX6TzgGaCjCrUU/doJxopzJ78eL+V1q3NNBvwb8I1q/ExXo6ZD2pxDdSdUK6oL+AVwSnj7OuBrDf7+nQlsJBhrN4I5qU9V83sZ6Wuo9yfMeWGOBe4HNofvp4fHZwH35LQ7n2C1wAtAX87xs4F14Yv+GLAwJnUdRfAXegPwBPCnja7pkOcaojrhXunrtIXgD9/68O3mCus57PMQ/KH9RHjbgG+F9/8K6C7ldatnTeHPtgNP57w+5zeypkOe4xyqGO5V+P4tAAbD1+v/AMfEoKYvAs8S5MD3CVfP1fNN2w+IiCSQzlAVEUkghbuISAIp3EVEEkjhLiKSQAp3EZEEUriLiCSQwl1EJIH+P5kaoYr+dFruAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(diabetes_x_test, diabetes_y_test, color=\"black\")\n",
    "plt.plot(diabetes_x_test, y_pre, color=\"blue\", linewidth=3)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}